package com.kim.bookshop.category.serviceimpl;

import java.util.List;

import com.kim.bookshop.category.bean.Category;
import com.kim.bookshop.category.dao.CategoryDao;
import com.kim.bookshop.category.service.CategoryService;

public class CategoryServiceImpl implements CategoryService {

	private CategoryDao categoryDao;
	
	@Override
	public List<Category> findAll() {
		
		return categoryDao.findAll();
	}

	@Override
	public void add(Category category) {
		categoryDao.add(category);

	}

	@Override
	public void remove(String cid) {
		categoryDao.delete(cid);
	}

	@Override
	public Category load(String cid) {
		return categoryDao.load(cid);
	}

	@Override
	public void edit(Category category) {
		categoryDao.edit(category);
	}

	public void setCategoryDao(CategoryDao categoryDao) {
		this.categoryDao = categoryDao;
	}

}
